﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Atomic.Permission.Entities;
using FluentNHibernate.Mapping;

namespace Atomic.Permission.Mappings
{
    public class RoleMap : ClassMap<RoleEntity>
    {
        public RoleMap()
        {
            Table("Role");
            Id(e => e.ID).GeneratedBy.Native();
            Map(e => e.Description).Length(255);
            Map(e => e.Enabled).CustomSqlType("int");
            Map(e => e.Name).Length(20).Not.Nullable();
            Map(e => e.Sort);
        }
    }
}
